import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;


public class queue {
	public static void main(String[] args)
	{
		

	Queue<String> queue = new LinkedList<String>();
	queue.add("iphone 3GS");
	queue.add("iphone4");
	queue.add("iphone 4S");
	queue.add("iphone 5");
	queue.add("iphone 5S");
	System.out.println("size of queue " + queue.size());
	Iterator queueIterator = queue.iterator();
	while(queueIterator.hasNext())
	{
		System.out.println(" " + queueIterator.next());
		
	}
	queue.remove();
	queue.remove();
	queue.remove();
	System.out.println("\n size of queue"+queue.size());
	queueIterator = queue.iterator();
	while(queueIterator.hasNext())
	{
		System.out.println(" " +queueIterator.next());
	}
	;
	}
}



